<section class="container-fluid" ng-init="cancelBoxFlag = false">
  <div class="row">
    <div class="col-md-9" ng-click="selectRecord($event, -1) ; isEditRecord = false ; isCreateTempLesson = false ">
      <div class="list-outer-wrap">
        <tabset justified="true">
          <tab ng-repeat="day in week" heading="{{day.header}}" select="retrieveRecords(day.beginTime,day.endTime)">
          	<div tab-fact-content>
		          <table class="table table-firstpage ng-table-responsive">
		          	<thead>
		          		<tr>
		          			<th>课程名称</th>
		          			<th>价格</th>
		          			<th>课程时长</th>
		          			<th>报名人数</th>
		          			<th style="text-align:center;">状态</th>
		          		</tr>
		          	</thead>
		            <tbody>
		          		<tr ng-repeat="record in records | orderBy:record.cance" ng-class="record.lessonStatus.value==3?'closedrecord':''">
		          			<td><span ng-class="record.course.classType.value==1?'class_diy':record.course.classType.value==2?'class_group':'class_private'">{{record.classTypeShortName}}</span>{{record.course.title}}</td>
		          			<td><span class="douz">X {{record.course.price}}</span></td>
		          			<td>{{record.tBeginTime}}&nbsp;-&nbsp;{{record.tEndTime}}&nbsp;/&nbsp;{{record.duration}}分钟</td>
		          			<td><a class="peoples" ng-click="retrieveBookedMombers(record);">{{record.numberBooked}}&nbsp;/&nbsp;{{record.numberLimit}}</a></td>
		          			<td>
		          				<a ng-click="cancelBox(record,record.id,record.lessonStatus.value,day.beginTime,day.endTime);" ng-class="record.lessonStatus.value==0?'open':record.lessonStatus.value==1?'proceed':record.lessonStatus.value==2?'outdated':record.lessonStatus.value==4?'later':'closed'">{{record.lessonStatus.name}}</a>
		          			</td>
		          		</tr>
		          	</tbody>
		          </table>
	          </div>
          </tab>
        </tabset>
      </div>
    </div>
    <div class="col-md-3 pull-right">
      <div class="eachrb hairline-bottom alpha_line">
        <div class="td_detail_box" ng-show=" !isCreateTempLesson ">
          <div class="tdd_table">
            <div class="tdd_row">
              <div class="tdd_cell">
                <div class="tdd_counts">
                  <span class="icon icon_pig" onMouseOver="playvoice('14')"></span>
                  <span class="text">{{income().today | number:1}}</span>
                </div>
                <div class="tdd_texts">
                  今日收入
                </div>
              </div>
              <div class="tdd_cell">
                <div class="tdd_counts">
                  <span class="icon icon_bag"></span>
                  <span class="text">{{income().total | number:1}}</span>
                </div>
                <div class="tdd_texts">
                  历史总收入
                </div>
              </div>
            </div>
          </div>
        </div>
        
        <div class="" ng-show="!isCreateTempLesson ">
          <h2 class="title">
            <span>扫码签到信息</span>
            <a href="#/messages" ng-class=" isRoute('/messages')? 'lnlinks cur' : 'lnlinks' " ng-click="setProcessParclose(false);" class="checkmore color-pink">查看详细</a> 
          </h2>
          <div ng-repeat="receipt in receivedReceipts.verified">
            <!--<p class="detail_texty01"> {{entry}} </p>
            <p class="detail_texty01"><span><b>奔跑的土豆</b>扫码签到特色循环－魔鬼式成功</span><font>16:20</font></p>-->
            <table class="detail_texty01">
              <tr>
              		<td width="40%"><b>{{receipt.member.name}}{{'[' + receipt.member.mobile +']'}}</b></td>
              		<td width="40%"><b>{{receipt.lesson.course.title}}</b></td>
                  <!--<td width="23%"><span>{{receipt.number}}人</span></td>-->
                  <!--<td width="23%"><span>{{receipt.paidInBean}}糖豆</span></td>-->
                  <td width="10%"><font>{{receipt.verifiedTime | dateParse|date:'hh:mm'}}</font></td>
              </tr>
            </table>
          </div>
          <div>
            	<a href="javascript:void(0);" class="btn btn-danger col-md-12" ng-click="signForm()">学员签到</a>
          </div>
        </div>
      </div>
    </div>
    
    <div ng-show="cancelBoxFlag" class="close_course">
      <h1><img src="images/popup_02.png" /></h1>
      <p></p>
      <table class="tables">
         <tr><th width="68">课程名称：</th>
             <td><span ng-class="record.course.classType.value==1?'class_diy':record.course.classType.value==2?'class_group':'class_private'">{{closeRecord.classTypeShortName}}</span>{{closeRecord.course.title}}</td>
         </tr>
         <tr><th>上课时间：</th>
             <td>{{closeRecord.tBeginTime}}&nbsp;-&nbsp;{{closeRecord.tEndTime}}&nbsp;/&nbsp;{{closeRecord.duration}}分钟</td>
         </tr>
         <tr><th>上课人数：</th>
             <td>{{closeRecord.numberBooked}}&nbsp;/&nbsp;{{closeRecord.numberLimit}}</td>
         </tr>
         <tr>
           <td colspan="2">
              <textarea rows="2" cols="" ng-model="reason"></textarea>
           </td>
         </tr>
         <tr>
         	<td colspan="2">
         		<div class="errormsg" >{{cancelLessonReasonMessage}}</div>
         	</td>
         </tr>
         <tr>
           <td colspan="2" style="text-align:center;">
              <button class="btn btn-default col-md-4 " ng-click="cancelLesson(lessonId,status,beginTime,endTime);">确定</button>
	  		  <button class="btn btn-default col-md-4 " ng-click="cancelBoxFlag=false;setParclose(false);">取消</button>
           </td>
         </tr>
      </table>
  </div>
  </div>
  
 	<div id="popupBox" ng-show="page.useOrderDetail" class="receiptsBox">
  		<a class="shut" ng-click="page.useOrderDetail=false;setParclose(false);"></a>
 		<div class="receipts_header">
  		课程类型：<span>{{selectedRecord.course.classType.name}}</span><br>
  		课程名字：<span>{{selectedRecord.course.title}}</span><br>
  		上课时间：<span>{{selectedRecord.lessonTime}}</span><s>(60分钟)</s><br>
  		上课教练：<span>{{selectedRecord.coach.name}}</span><br>
  		上课人数：<span>{{selectedRecord.numberBooked}}</span><br>
  		课程价格：<span class="douz">X {{selectedRecord.course.price}}</span><br>
  	</div>  	
    <div class="receipts_content">
	    	<table class="table">
	    		<thead>
		    		<tr>
                        <th>&nbsp;</th>
		    			<th style="width: 20%;">订单号</th>
		    			<th style="width: 15%;">用户</th>
		    			<th style="width: 15%;">手机号</th>
		    			<th style="width: 15%;">人数</th>
		    			<th style="width: 15%;">订单总价</th>
		    			<th style="width: 15%;">签到状态<th>
		    		</tr>
	    		</thead>
	    		<tbody>
		    		<tr ng-repeat="receipt in receipts">
                        <td>&nbsp;</td>
		    			<td>{{receipt.id}}</td>
		    			<td>{{receipt.member.name}}</td>
		    			<td>{{receipt.member.mobile}}</td>
		    			<td>{{receipt.number}}</td>
		    			<td>{{receipt.paidInBean + receipt.paidInCoupon}}颗豆<span ng-show="receipt.paidInCoupon>0">({{receipt.paidInCoupon}}颗体验豆)</span></td>
		    			<td style="padding-left:20px"><span ng-class="receipt.status==1?'booked':receipt.status==4?'verified':''">{{receipt.status==4?'√':''}}</span></td>
		    		</tr>
	    		</tbody>
	    	</table>
    	</div>    
  </div>
  <div ng-show="page.needSignForm" class="sign">
  	<a ng-click="closeSignForm();" class="shut"></a>
  	<div class="sign-header">
  		学员签到
  	</div>
  	<div class="sign-content">
  		<p>请输入签到码</p>
  		<input type="text" ng-model="signCode" />
  		<p class="errormsg">{{errMsg.signMsg}}</p>
  	</div>
  	<div class="sign-bottom" ng-click="sign()">
  		<span>确&nbsp;认</span>
  	</div>
  </div>
</section>
